<%@page import="com.wframe.framework.util.UploadUtil"%>
<%@ page language="java" pageEncoding="utf-8"%>
<%@taglib uri="/WEB-INF/page-base.tld" prefix="w"%>
<%String path=request.getContextPath();request.setAttribute("fileserver", UploadUtil.getConfig().getDownserver()); %>

<div class="easyui-panel" data-options="doSize:false,layoutH:47,border:false" style="margin:5px">
	<form method="post" action="/order/OrderPage@update.page" class="pageForm">
		<w:hidden bind="bean.id"/>
		<div class="order-h"><strong>订单信息</strong></div>
		<div class="order-c">
			<p><span>订单编号：<w:write bind="bean.code"/>（<w:write bind="bean.backtag" format="[,待审核,同意退货,已拒绝,已取消,已完成]"/>）</span><span>申请时间：<w:write bind="bean.applytime" format="yyyy-MM-dd HH:mm:ss"/></span></p>
			<p><span>退货原原因：<w:write bind="bean.reason"/></span></p>
			<p><span style="width:auto">上传图片：
			<w:iterate bind="bean.backphotos" id="photo" indexId="num">
			<a class="backimga"><img src="<%=path%><w:write bind="#photo.filepath"/>" class="backimg"></a>
			</w:iterate>
			</span></p>
			<p><span>联系电话：<w:write bind="bean.backphone"/></span></p>
		</div>
		<div class="line10 bodybg"></div>
		<div class="order-h"><strong>商品信息</strong></div>
		<div class="order-c">
			<table class="ui-table" width="100%" cellpadding="1" cellspacing="1" data-options="showPage:false">
				<thead>
					<tr class="ui_th">
						<td>商品图片</td>
						<td>商品编号</td>
						<td>商品名称</td>
						<td>规格</td>
						<td>价格</td>
						<td>可退数量</td>
						<td>退货数量</td>
						<td>小计</td>
					</tr>
				</thead>
				<w:iterate id="product" bind="bean.products">
				<tr class="ui_td">
					<td><img src="${fileserver }<w:write bind="#product.photo"/>" class="productimg"></td>
					<td><w:write bind="#product.productcode"/></td>
					<td><w:write bind="#product.productname"/> <w:write bind="#product.name"/></td>
					<td><w:write bind="#product.b_guige"/></td>
					<td><w:write bind="#product.price"/></td>
					<td><w:write bind="#product.buyamount"/></td>
					<td><w:write bind="#product.backamount"/></td>
					<td><w:write bind="#product.sumprice"/></td>
				</tr>
				</w:iterate>
			</table>
		</div>
		<div class="line10 bodybg"></div>
		<div class="order-h"><strong>费用信息</strong></div>
		<div class="order-c">
			<p><span class="red"><strong>总退款金额：￥<w:write bind="bean.backmoney" format="#0.00"/></strong></span></p>
		</div>
		<w:define id="backtag"  bind="bean.backtag" type="java.lang.Integer"/>
		<%if(backtag==2 || backtag==3 || backtag==5){ %>
			<div class="line10 bodybg"></div>
			<div class="order-h"><strong>审核信息</strong></div>
			<div class="order-c">
				<p><span>审核时间：<w:write bind="bean.authtime" format="yyyy-MM-dd HH:mm"/></span></p>
				<p><span>审核状态：<w:write bind="bean.backtag" format="[,待审核,同意退货,已拒绝,已取消,已完成]"/></span></p>
				<p><span>审核结果：<w:write bind="bean.authcon"/></span></p>
			</div>
		<%} %>
	</form>
	<div class="line10"></div>
</div>
<div class="ui-buttonBar">
	<w:equal bind="bean.backtag" value="1">
		<a href="javascript:;" class="easyui-linkbutton marginR16" iconCls="icon_save" onclick="tuihauth(<w:write bind="bean.id"/>,1);">同意退货</a>
		<a href="javascript:;" class="easyui-linkbutton marginR16" iconCls="icon_save" onclick="tuihauth(<w:write bind="bean.id"/>,0);">拒绝退货</a>
	</w:equal>
	<a href="javascript:;" class="easyui-linkbutton" iconCls="icon_cancel" onclick="$w.closeCurrWin()">关闭</a>
</div>
<div id="outerdiv" style="position:fixed;top:0;left:0;background:rgba(0,0,0,0.7);z-index:2;width:100%;height:100%;display:none;"><div id="innerdiv" style="position:absolute;"><img id="bigimg" style="border:5px solid #fff;" src="" /></div></div> 
	
<script>
$(".backimga").click(function(){ 
      var _this = $(this);
      imgShow("#outerdiv", "#innerdiv", "#bigimg", $("img",_this));   
})
</script>